var express = require('express')
var bodyParser = require('body-parser')
var fs = require('fs')

var router = require('./router')

var app = express()

app.use('/node_modules/', express.static('./node_modules/'))
app.use('/public/', express.static('./public/'))
app.engine('html', require('express-art-template'))

//关于post请求的
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())

//挂载路由容器
app.use(router)


app.listen(3000, function () {
  console.log('running 3000...')
})

